<style>
    .comment-tipoff {
        cursor: pointer;
    }
    .comment-thumb{
        cursor: pointer;
    }
</style>
<div id="cimo_comment">
    <span class="h4">评论</span>
    <div class="progress tiaotiao">
        <div class="progress-bar progress-bar-success " role="progressbar" aria-valuenow="10" aria-valuemin="0" aria-valuemax="100" style="width: 20%;">
            <span class="sr-only"></span>
        </div>
    </div>
    <div class="first-comment-form clearfix" style=" position: relative;">
        <textarea id="comment-reply-content" placeholder="我来说两句....." data-emojiable="true"></textarea>
        <div class="clearfix">
            <div id="message" class="clearfix" style="display: none;"></div>
            <button type="button" class="fr" id="submit-main" @if(empty($authuser))onclick="
            @if(is_mobile())
                    tologin();
            @else
                    loginTips();
            @endif"
                    @endif>
                评论
            </button>
        </div>
    </div>
    <div class="clearfix"></div>
    <div id="cimo-comment-container">
        @foreach($comments as $k=>$vo)
            <div class="cimo-comment-common" id="comment-common{{$k}}" style="">
                <div class="cimo-comment-user-avatar fl ">
                    <a name="{{$vo->comment_id}}" cdata-id="{{$k}}"><img src="{{userlogo($vo->user_id,'middle')}}"></a>
                </div>
                <div class="fl cimo-comment-right" style="" data-commentid="{{$vo->comment_id}}">
                    <div class="comment-content text-left" style="">
                        <p class="cimo-comment-first" style="">
                            <span class="cimo-comment-username">{{getUserName($vo->user_id)}}</span>
                            <span class="ml-10 cimo-comment-time">{{$vo->created_at}}</span>
                            <span style="float:right;">
                                 <a class="comment-tipoff" data-id="{{$vo->comment_id}}">举报</a>
                                 <a class="ml-10 comment-thumb" data-id="{{$vo->comment_id}}">点赞(<span>{{$vo->thumbs}}</span>)</a>
                            </span>
                        </p>
                        <p class="cimo-comment-second" style=" ">{{$vo->content}}</p>
                        <div class="fs14 c9 ma0">
                            <div class="fl">
                                <a href="javascript:;" class="second-comment-response" data-uid="{{$vo->user_id}}">回复</a>
                            </div>
                            <div class="fr mr15">
                                <img src="{{ asset('/images/front/jiuyezhinan/pl.png') }}">
                                @if(count($vo->childComments)>0)
                                    <input type="text" name="totalnum{{$vo->comment_id}}" value="{{count($vo->childComments)}}" readonly="readonly">
                                @else
                                    <input type="text" name="totalnum{{$vo->comment_id}}" value="0" readonly="readonly">
                                @endif
                            </div>
                            <div class="clr"></div>
                        </div>
                    </div>
                    <div class="comment-child text-left" id="comment-childs{{$vo->comment_id}}">
                        @if(count($vo->childComments)>0)
                            <div class="comment-caret-up">
                                <i class="glyphicon glyphicon-triangle-top"></i>
                            </div>
                            <div class="comment-child-content" id="comment-child-content{{$vo->comment_id}}" style="">
                                @foreach($vo->childComments as $key=>$zn)
                                    @if($key<30)
                                        <div class="comment-child-content-list">
                                            <p class="fs14 color-green">
                                                <span>{{getUserName($zn->user_id)}}</span>
                                                <span class="ml-10" style="margin-right: 10px;">回复</span>
                                                <span>{{getUserName($zn->to_user_id)}}</span>
                                                ：
                                                <span class="ml-20">{{$zn->created_at}}</span>
                                                 <span style="float:right;">
                                                     <a class="comment-tipoff" data-id="{{$zn->comment_id}}">举报</a>
                                                     <a class="ml-10 comment-thumb" data-id="{{$zn->comment_id}}">点赞(<span>{{$zn->thumbs}}</span>)</a>
                                                     <a class="ml-20 second-comment-response" data-uname="{{getUserName($zn->user_id)}}" data-id="{{$zn->comment_id}}" data-uid="{{$zn->user_id}}">回复</a>
                                                </span>
                                            </p>
                                            <p class="fs14 c5">{{$zn->content}}</p>
                                        </div>
                                    @endif
                                @endforeach
                            </div>
                        @endif
                    </div>
                    <div id="message{{$vo->comment_id}}" class="commentmsg dn"></div>
                    <div id="comment-reply{{$vo->comment_id}}" class="comment-reply-form" style=" border: none;">

                    </div>
                </div>
                <div class="clr"></div>
            </div>
        @endforeach
    </div>
    {{-- 分页 --}}
    <div id="holder" @if(count($comments)== 0) class="holder dn" @else class="holder" @endif></div>
    <script>
        cjPages();
    </script>
</div>